<style>
.ndykien{
    padding:20px;
}
.gy_form input, .gy_form textarea{
    padding:4px;
    margin:3px;
    border:1px solid #cacaca;
}
.submit{
    cursor :pointer;
    background: #0AFF1E;
}
.loi{
    color:red;
}
.box_ykiens{
    border:1px solid #cacaca;
    margin:5px 0px;
}
.box_ykiens .box_header{
    background:#4E636B;
    height:25px;
    line-height: 25px;
    padding:0px 10px;
}
.box_header h2{
    color:#fff;
    font-size:14px;
}
.box_ykiens .box_content{
    padding:10px 20px 20px 20px;
}
.susses{
    border:1px solid #62E589;
    color:#D80D79;
    padding:10px;
    background:#62E589;
}
</style>
<div class="box-product">
<div class="module-title detail">								
<h3>Ý kiến khách hàng</h3>								
</div>
<div class="module-content ndykien">
    <?php
    if(!empty($data2)){
        foreach ($data2 as $data2){
            echo '<div class="box_ykiens">
                    <div class="box_header"><h2>'.$data2->ten.'</h2></div>';
            echo '<div class="box_content">
            <h4>'.$data2->tieude.'</h4>
            '.$data2->noidung.'
            </div>
            </div>
            ';
        }
    }else echo 'Nội dung không tồn tại';
    echo '<ul class="phantrang clearfix">'.$this->pagination->create_links().'</ul>';
    
    ?>

<?php


echo '<br/><h2>Gửi ý kiến đóng góp:</h2><br/>';
if($this->session->userdata('gopy')){
    echo '<div class="susses">'.$this->session->userdata('gopy').'</div>';
    $this->session->unset_userdata('gopy');
}
echo '
<div class="gy_form">
 <form method="POST" action="'.base_url().'gopy/danhsach">';
        
        echo '
        <input type="text" name="ten" value="'.set_value("ten").'" > Tên  '.form_error('ten').'<br/>
        <input type="text" name="email" value="'.set_value("email").'"> Email  '.form_error('email').'<br/>
        <input type="text" name="dienthoai" value="'.set_value("dienthoai").'"> Điện thoại  '.form_error('dienthoai').'<br/>
        <input type="text" name="tieude" value="'.set_value("tieude").'"> Tiêu đề  '.form_error('tieude').'<br/>
        Nội dung:  '.form_error('noidung').'<br/>
        <textarea cols="70" rows="8" name="noidung" value="'.set_value("noidung").'"></textarea>
        <br/>
        <input class="submit" type="submit" value="Gửi ý kiến">
        </form>
        ';
       
?>									
</div>
</div>
